package com.service.consumer.feign;

import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.service.consumer.config.FeignConfig;
import com.service.consumer.factory.RemoteProviderFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

/**
 * @author 24466
 * @date 2024/10/13 13:24
 */
@FeignClient(contextId = "remoteProviderService", value = ServiceNameConstants.PROVIDER_SERVICE, fallbackFactory = RemoteProviderFallbackFactory.class, configuration = FeignConfig.class)
public interface RemoteProviderService {

    @GetMapping("/provider/{str}")
    public String echo(@PathVariable("str") String str);
}
